#ifndef CONSTANTES
#define CONSTANTES

#include <math.h>

#define NB_DEGRES            1

#define _N                   200 // Nombre de Variables
#define _K                   100 // Nombre de Checks   
#define _M                   600 // Nombre de Messages 

#define NOEUD   _N
#define MESSAGE _M

#define NmoinsK     (_N-_K)

#define DEG_1                6

#define DEG_1_COMPUTATIONS   100

#define NB_ITERATIONS        20
#define NB_BITS_VARIABLES    8 //8
#define NB_BITS_MESSAGES     6 //6
#define SAT_POS_VAR  ( (0x0001<<(NB_BITS_VARIABLES-1))-1)
#define SAT_NEG_VAR  (-(0x0001<<(NB_BITS_VARIABLES-1))+1)
#define SAT_POS_MSG  ( (0x0001<<(NB_BITS_MESSAGES -1))-1)
#define SAT_NEG_MSG  (-(0x0001<<(NB_BITS_MESSAGES -1))+1)

static float  beta         = 0.15;
static int    FACTEUR_BETA = (0x0001<<(NB_BITS_MESSAGES/2));
static int    BETA_FIX; //     = ((int)(FACTEUR_BETA*beta))

#endif


#ifndef _PosNoeudsVariable_
#define _PosNoeudsVariable_
const unsigned short PosNoeudsVariable[600] ={
/* msg =      0, deg =  6 */     66,     80,     87,     99,    117,    144, 
/* msg =      1, deg =  6 */     48,     49,    120,    129,    134,    138, 
/* msg =      2, deg =  6 */     41,     55,     58,    146,    151,    179, 
/* msg =      3, deg =  6 */      3,     51,     63,     94,     96,    172, 
/* msg =      4, deg =  6 */     30,     43,    125,    136,    139,    194, 
/* msg =      5, deg =  6 */     54,     55,     91,    104,    123,    152, 
/* msg =      6, deg =  6 */     27,     42,    134,    162,    173,    187, 
/* msg =      7, deg =  6 */     10,     11,     31,     84,    166,    184, 
/* msg =      8, deg =  6 */     16,     66,    102,    123,    133,    159, 
/* msg =      9, deg =  6 */      2,     37,     66,     69,     85,    198, 
/* msg =     10, deg =  6 */     15,     52,     54,     69,    138,    184, 
/* msg =     11, deg =  6 */     44,     78,     89,     95,    165,    177, 
/* msg =     12, deg =  6 */     14,     44,     62,    119,    157,    167, 
/* msg =     13, deg =  6 */     26,     38,     57,     83,    132,    181, 
/* msg =     14, deg =  6 */     28,     86,    144,    148,    183,    196, 
/* msg =     15, deg =  6 */      3,      7,     21,     76,    136,    178, 
/* msg =     16, deg =  6 */      4,     73,     88,     98,    172,    182, 
/* msg =     17, deg =  6 */      8,     12,     18,     41,    117,    188, 
/* msg =     18, deg =  6 */     62,     92,    110,    116,    127,    154, 
/* msg =     19, deg =  6 */     56,    109,    127,    131,    160,    197, 
/* msg =     20, deg =  6 */     20,     72,     77,    154,    155,    178, 
/* msg =     21, deg =  6 */     54,     60,     74,     98,    158,    187, 
/* msg =     22, deg =  6 */      0,      7,     19,    108,    156,    164, 
/* msg =     23, deg =  6 */     13,     53,     74,    103,    143,    193, 
/* msg =     24, deg =  6 */     32,     34,     57,    127,    177,    191, 
/* msg =     25, deg =  6 */     28,     37,     43,    112,    131,    181, 
/* msg =     26, deg =  6 */     58,     78,     97,    101,    109,    190, 
/* msg =     27, deg =  6 */     12,     68,     82,    132,    172,    176, 
/* msg =     28, deg =  6 */      4,      5,     25,    111,    142,    190, 
/* msg =     29, deg =  6 */      8,     39,     70,     78,    125,    162, 
/* msg =     30, deg =  6 */     16,     21,     35,     88,    146,    197, 
/* msg =     31, deg =  6 */     63,     84,    101,    120,    154,    163, 
/* msg =     32, deg =  6 */     12,     64,     95,    126,    173,    186, 
/* msg =     33, deg =  6 */     42,     44,     77,    100,    117,    128, 
/* msg =     34, deg =  6 */     42,     90,     94,    122,    159,    164, 
/* msg =     35, deg =  6 */     16,     38,     39,    128,    145,    166, 
/* msg =     36, deg =  6 */     76,     92,    112,    149,    175,    176, 
/* msg =     37, deg =  6 */      1,     61,    101,    119,    123,    135, 
/* msg =     38, deg =  6 */     47,    106,    113,    132,    167,    198, 
/* msg =     39, deg =  6 */     11,     33,     98,    110,    114,    133, 
/* msg =     40, deg =  6 */     18,     24,     59,     65,    150,    189, 
/* msg =     41, deg =  6 */     89,    106,    158,    180,    192,    195, 
/* msg =     42, deg =  6 */      5,     13,     86,    115,    145,    170, 
/* msg =     43, deg =  6 */     47,     93,    115,    133,    185,    194, 
/* msg =     44, deg =  6 */     25,     33,     35,     36,     91,    189, 
/* msg =     45, deg =  6 */     30,    113,    120,    130,    175,    179, 
/* msg =     46, deg =  6 */     24,    105,    107,    114,    130,    170, 
/* msg =     47, deg =  6 */     14,     59,     79,     96,    140,    141, 
/* msg =     48, deg =  6 */      6,     46,     86,    157,    179,    187, 
/* msg =     49, deg =  6 */     41,     84,    102,    165,    183,    193, 
/* msg =     50, deg =  6 */     50,    100,    110,    125,    150,    153, 
/* msg =     51, deg =  6 */     17,     56,    103,    118,    141,    161, 
/* msg =     52, deg =  6 */     15,     23,     25,     32,     94,    148, 
/* msg =     53, deg =  6 */     22,     29,     40,    121,    157,    199, 
/* msg =     54, deg =  6 */     29,     30,     77,     79,     82,    147, 
/* msg =     55, deg =  6 */      2,     40,     61,     74,     92,    148, 
/* msg =     56, deg =  6 */     51,     72,     89,     99,    150,    166, 
/* msg =     57, deg =  6 */     22,     71,     85,    118,    126,    145, 
/* msg =     58, deg =  6 */     71,    124,    135,    153,    176,    195, 
/* msg =     59, deg =  6 */      0,     33,     43,     68,    191,    193, 
/* msg =     60, deg =  6 */     26,     60,     63,     87,    105,    111, 
/* msg =     61, deg =  6 */     39,     62,     81,    142,    180,    183, 
/* msg =     62, deg =  6 */     93,    108,    112,    129,    147,    190, 
/* msg =     63, deg =  6 */      9,     17,    121,    149,    156,    198, 
/* msg =     64, deg =  6 */      1,      7,     10,     57,    161,    162, 
/* msg =     65, deg =  6 */     17,     23,     82,    104,    134,    185, 
/* msg =     66, deg =  6 */      3,     36,    115,    137,    173,    199, 
/* msg =     67, deg =  6 */     11,     46,     87,    126,    178,    192, 
/* msg =     68, deg =  6 */     52,     80,     81,    124,    139,    161, 
/* msg =     69, deg =  6 */     31,     76,    118,    168,    171,    182, 
/* msg =     70, deg =  6 */     37,     48,     51,     70,    116,    186, 
/* msg =     71, deg =  6 */     53,     72,     83,    140,    188,    194, 
/* msg =     72, deg =  6 */      8,    107,    129,    152,    169,    192, 
/* msg =     73, deg =  6 */     26,     56,    108,    151,    153,    199, 
/* msg =     74, deg =  6 */      9,     21,     45,     99,    107,    174, 
/* msg =     75, deg =  6 */     50,     64,     75,    122,    185,    197, 
/* msg =     76, deg =  6 */     46,     69,    109,    128,    168,    189, 
/* msg =     77, deg =  6 */     70,     73,     90,    155,    170,    191, 
/* msg =     78, deg =  6 */     65,     80,     95,    121,    163,    171, 
/* msg =     79, deg =  6 */     50,     61,     83,    130,    142,    171, 
/* msg =     80, deg =  6 */      5,     34,     52,     64,     79,    151, 
/* msg =     81, deg =  6 */     13,     32,     48,     97,    106,    182, 
/* msg =     82, deg =  6 */      6,     15,     45,     67,    147,    163, 
/* msg =     83, deg =  6 */      0,      4,     18,     22,     47,    196, 
/* msg =     84, deg =  6 */     19,     23,     59,    146,    186,    195, 
/* msg =     85, deg =  6 */     35,     53,    113,    116,    135,    184, 
/* msg =     86, deg =  6 */     20,     38,     65,     93,    103,    174, 
/* msg =     87, deg =  6 */    104,    114,    124,    131,    164,    165, 
/* msg =     88, deg =  6 */     19,     73,    137,    138,    167,    188, 
/* msg =     89, deg =  6 */      2,      6,     20,     68,     97,    105, 
/* msg =     90, deg =  6 */     49,     91,    122,    143,    149,    180, 
/* msg =     91, deg =  6 */     27,     31,     55,     96,    139,    156, 
/* msg =     92, deg =  6 */     36,     58,     75,    140,    158,    196, 
/* msg =     93, deg =  6 */     29,     75,     81,    168,    169,    181, 
/* msg =     94, deg =  6 */      9,     14,     28,     60,     71,     90, 
/* msg =     95, deg =  6 */     67,    136,    141,    159,    169,    177, 
/* msg =     96, deg =  6 */    100,    102,    137,    160,    174,    175, 
/* msg =     97, deg =  6 */      1,     24,     49,     67,     88,    144, 
/* msg =     98, deg =  6 */     10,     40,    111,    152,    155,    160, 
/* msg =     99, deg =  6 */     27,     34,     45,     85,    119,    143
};
#endif

